package string;

import java.util.Arrays;

//拆分
public class SplitDemo {
    public static void main(String[] args) {
        String line="12123dsfhnv3e2542,fklieheroiy5hfi2";
        String[] strings=line.split("[0-9]+");
        for (int i=0;i<strings.length;i++){
            System.out.println(strings[i]);
        };
        line="151.556.154.4464.584.";
        strings=line.split("\\.");
        System.out.println(Arrays.toString(strings));
        line=".15..54.254...545.....";
        strings=line.split("\\.");
        System.out.println(Arrays.toString(strings));
        System.out.println(strings.length);
    }
}
